﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.SampleDataSource"
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
	xmlns:Behaviors="clr-namespace:Behaviors;assembly=Behaviors"
	x:Class="System8ToyMC.LoadFromTextDialog"
	d:DesignWidth="640" d:DesignHeight="480">

	<UserControl.Resources>
		<SampleData:SampleDataSource x:Key="SampleDataSource" d:IsDataSource="True"/>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" d:DataContext="{Binding Source={StaticResource SampleDataSource}}" Height="247" VerticalAlignment="Top" HorizontalAlignment="Left" Width="316" d:LayoutOverrides="HorizontalAlignment">
		<Grid.Background>
			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="#FF6E87F6" Offset="0"/>
				<GradientStop Color="#FF0A36FE" Offset="1"/>
			</LinearGradientBrush>
		</Grid.Background>
		<TextBox Margin="8,8,6,32" Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=Default}" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" ToolTipService.ToolTip="Enter text to be parsed as the values for s8" x:Name="TBConvertText" >
			<i:Interaction.Triggers>
				<Behaviors:TextBoxValueStatusChanged FireIfEmpty="False">
					<ic:ChangePropertyAction x:Name="EnableConvertWhenNoText" TargetName="BConvert" PropertyName="IsEnabled" Value="True"/>
				</Behaviors:TextBoxValueStatusChanged>
				<Behaviors:TextBoxValueStatusChanged FireIfEmpty="True">
					<ic:ChangePropertyAction x:Name="DisableConvertWhenNoText" TargetName="BConvert" PropertyName="IsEnabled" Value="False"/>
				</Behaviors:TextBoxValueStatusChanged>
			</i:Interaction.Triggers>
		</TextBox>
		<Button Margin="0,0,6,6" Content="Cancel" HorizontalAlignment="Right" VerticalAlignment="Bottom" x:Name="BCancel" Click="BCancel_Click" />
		<Button Margin="0,0,53,6" Content="Convert" VerticalAlignment="Bottom" HorizontalAlignment="Right" d:LayoutOverrides="HorizontalAlignment" x:Name="BConvert" Click="BConvert_Click" IsEnabled="False" />
	</Grid>
</UserControl>